<template>
    <view class="base-container" v-bind:style="{ minHeight: systemInfo.windowHeight + 'px', ...customStyle }">
        <view :class="props.safeBottom ? 'safe-bottom' : ''">
            <slot></slot>
        </view>
    </view>
</template>

<script setup lang="ts">
const props = defineProps({
    block: {
        type: Boolean,
        default: false
    },
    safeBottom: {
        type: Boolean,
        default: true,
    },
    customStyle: {
        type: Object,
        default() {
            return {};
        }
    }
})
const systemInfo = uni.getSystemInfoSync()
</script>

<style lang="scss">
.base-container {
    color: $uni-text-color;
    background-color: #F5F7F8;
}

.safe-bottom {
    /* iphonex 等安全区设置，底部安全区适配 */
    /* #ifndef APP-NVUE */
    padding-bottom: constant(safe-area-inset-bottom);
    padding-bottom: env(safe-area-inset-bottom);
    /* #endif */
}

</style>
